/**
 * Created by THINK on 2017/8/17.
 */

$(document).ready(function(){
    //获取座位信息
    $.getJSON("js/company.json", "", function (data) {
        $.each(data.d.results,  function (i, item) {
            var area_val 		= item.Area;
            var Seat_val = item.Title;
            var Avaliable_info     = item.Available;
            if (Avaliable_info){
                // debugger;
                occupyInfo(Seat_val);
            }
        })
    });

    //标点信息
    $('#container1').hotSpot({
        slideshow : false,
        delayOpen : 1200,
        delayClose : 100
    });
});

//如果座位已被占用标记出来
function occupyInfo(Seat_val) {
    $("#" + Seat_val).attr('src', 'img/company/chair-haveCabinet-selected-right.png');
}
